
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>行协议 · InfluxDB中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jasper">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../Query_language/" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://legacy.gitbook.com/book/jasper-zhang1/influxdb" target="_blank" class="custom-link">InfluxDB中文文档</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Introduction/">
            
                <a href="../Introduction/">
            
                    
                    介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Introduction/installation.html">
            
                <a href="../Introduction/installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Introduction/getting_start.html">
            
                <a href="../Introduction/getting_start.html">
            
                    
                    入门指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Guide/">
            
                <a href="../Guide/">
            
                    
                    使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Guide/writing_data.html">
            
                <a href="../Guide/writing_data.html">
            
                    
                    写入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Guide/querying_data.html">
            
                <a href="../Guide/querying_data.html">
            
                    
                    查询数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Guide/downsampling_and_retention.html">
            
                <a href="../Guide/downsampling_and_retention.html">
            
                    
                    采样和数据保留
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Guide/hardware_sizing.html">
            
                <a href="../Guide/hardware_sizing.html">
            
                    
                    硬件指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Guide/https_setup.html">
            
                <a href="../Guide/https_setup.html">
            
                    
                    HTTPS设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Concepts/">
            
                <a href="../Concepts/">
            
                    
                    概念介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Concepts/key_concepts.html">
            
                <a href="../Concepts/key_concepts.html">
            
                    
                    关键概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Concepts/glossary.html">
            
                <a href="../Concepts/glossary.html">
            
                    
                    专业术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Concepts/crosswalk.html">
            
                <a href="../Concepts/crosswalk.html">
            
                    
                    与SQL比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Concepts/insights_tradeoffs.html">
            
                <a href="../Concepts/insights_tradeoffs.html">
            
                    
                    InfluxDB的设计见解和权衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Concepts/schema_and_data_layout.html">
            
                <a href="../Concepts/schema_and_data_layout.html">
            
                    
                    schema设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Concepts/storage_engine.html">
            
                <a href="../Concepts/storage_engine.html">
            
                    
                    存储引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="./">
            
                <a href="./">
            
                    
                    写入协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="line_protocol.html">
            
                <a href="line_protocol.html">
            
                    
                    行协议
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Query_language/">
            
                <a href="../Query_language/">
            
                    
                    查询语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Query_language/data_exploration.html">
            
                <a href="../Query_language/data_exploration.html">
            
                    
                    数据查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Query_language/schema_exploration.html">
            
                <a href="../Query_language/schema_exploration.html">
            
                    
                    schema查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Query_language/database_management.html">
            
                <a href="../Query_language/database_management.html">
            
                    
                    数据库管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Query_language/continuous_queries.html">
            
                <a href="../Query_language/continuous_queries.html">
            
                    
                    连续查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Query_language/functions.html">
            
                <a href="../Query_language/functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Query_language/math_operators.html">
            
                <a href="../Query_language/math_operators.html">
            
                    
                    数学运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Query_language/authentication_and_authorization.html">
            
                <a href="../Query_language/authentication_and_authorization.html">
            
                    
                    认证和授权
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Troubleshooting/">
            
                <a href="../Troubleshooting/">
            
                    
                    故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Troubleshooting/faq.html">
            
                <a href="../Troubleshooting/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Troubleshooting/system_monitor.html">
            
                <a href="../Troubleshooting/system_monitor.html">
            
                    
                    系统监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Troubleshooting/query_management.html">
            
                <a href="../Troubleshooting/query_management.html">
            
                    
                    查询管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Troubleshooting/error_messages.html">
            
                <a href="../Troubleshooting/error_messages.html">
            
                    
                    错误信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >行协议</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x884C;&#x534F;&#x8BAE;">&#x884C;&#x534F;&#x8BAE;</h1>
<p>InfluxDB&#x7684;&#x884C;&#x534F;&#x8BAE;&#x662F;&#x4E00;&#x79CD;&#x5199;&#x5165;&#x6570;&#x636E;&#x70B9;&#x5230;InfluxDB&#x7684;&#x6587;&#x672C;&#x683C;&#x5F0F;&#x3002;&#x5FC5;&#x987B;&#x8981;&#x662F;&#x8FD9;&#x6837;&#x7684;&#x683C;&#x5F0F;&#x7684;&#x6570;&#x636E;&#x70B9;&#x624D;&#x80FD;&#x88AB;Influxdb&#x89E3;&#x6790;&#x548C;&#x5199;&#x5165;&#x6210;&#x529F;&#xFF0C;&#x5F53;&#x7136;&#x9664;&#x975E;&#x4F60;&#x4F7F;&#x7528;&#x4E00;&#x4E9B;&#x5176;&#x4ED6;&#x670D;&#x52A1;&#x63D2;&#x4EF6;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x865A;&#x6784;&#x7684;&#x6E29;&#x5EA6;&#x6570;&#x636E;&#xFF0C;&#x672C;&#x9875;&#x9762;&#x4ECB;&#x7ECD;&#x4E86;&#x884C;&#x534F;&#x8BAE;&#x3002; &#x5B83;&#x6DB5;&#x76D6;&#xFF1A;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x8BED;&#x6CD5;</th>
<th style="text-align:center">&#x6570;&#x636E;&#x7C7B;&#x578B;</th>
<th style="text-align:center">&#x5F15;&#x53F7;</th>
<th style="text-align:center">&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#x548C;&#x5173;&#x952E;&#x5B57;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"></td>
</tr>
</tbody>
</table>
<p>&#x6700;&#x540E;&#x4E00;&#x8282;&#xFF0C;&#x5C06;&#x6570;&#x636E;&#x5199;&#x5165;InfluxDB&#xFF0C;&#x4ECB;&#x7ECD;&#x5982;&#x4F55;&#x5C06;&#x6570;&#x636E;&#x5B58;&#x5165;InfluxDB&#xFF0C;&#x4EE5;&#x53CA;InfluxDB&#x5982;&#x4F55;&#x5904;&#x7406;&#x884C;&#x534F;&#x8BAE;&#x91CD;&#x590D;&#x95EE;&#x9898;&#x3002;</p>
<h2 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h2>
<p>&#x4E00;&#x884C;Line Protocol&#x8868;&#x793A;InfluxDB&#x4E2D;&#x7684;&#x4E00;&#x4E2A;&#x6570;&#x636E;&#x70B9;&#x3002;&#x5B83;&#x5411;InfluxDB&#x901A;&#x77E5;&#x70B9;&#x7684;measurement&#xFF0C;tag set&#xFF0C;field set&#x548C;timestamp&#x3002;&#x4EE5;&#x4E0B;&#x4EE3;&#x7801;&#x5757;&#x663E;&#x793A;&#x4E86;&#x884C;&#x534F;&#x8BAE;&#x7684;&#x793A;&#x4F8B;&#xFF0C;&#x5E76;&#x5C06;&#x5176;&#x5206;&#x89E3;&#x4E3A;&#x5176;&#x5404;&#x4E2A;&#x7EC4;&#x4EF6;&#xFF1A;</p>
<pre><code>weather,location=us-midwest temperature=82 1465839830100400200
  |    -------------------- --------------  |
  |             |             |             |
  |             |             |             |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
</code></pre><h3 id="measurement">measurement</h3>
<p>&#x4F60;&#x60F3;&#x8981;&#x5199;&#x5165;&#x6570;&#x636E;&#x7684;measurement&#xFF0C;&#x8FD9;&#x5728;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x662F;&#x5FC5;&#x9700;&#x7684;&#xFF0C;&#x4F8B;&#x5982;&#x8FD9;&#x91CC;&#x7684;measurement&#x662F;<code>weather</code>&#x3002;</p>
<h3 id="tag-set">Tag set</h3>
<p>&#x4F60;&#x60F3;&#x8981;&#x6570;&#x636E;&#x70B9;&#x4E2D;&#x5305;&#x542B;&#x7684;tag&#xFF0C;tag&#x5728;&#x884C;&#x534F;&#x8BAE;&#x91CC;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x6CE8;&#x610F;measurement&#x548C;tag set&#x662F;&#x7528;&#x4E0D;&#x5E26;&#x7A7A;&#x683C;&#x7684;&#x9017;&#x53F7;&#x5206;&#x5F00;&#x7684;&#x3002;</p>
<p>&#x7528;&#x4E0D;&#x5E26;&#x7A7A;&#x683C;&#x7684;<code>=</code>&#x6765;&#x5206;&#x5272;&#x4E00;&#x7EC4;tag&#x7684;&#x952E;&#x503C;&#xFF1A;</p>
<pre><code>&lt;tag_key&gt;=&lt;tag_value&gt;
</code></pre><p>&#x591A;&#x7EC4;tag&#x76F4;&#x63A5;&#x7528;&#x4E0D;&#x5E26;&#x7A7A;&#x683C;&#x7684;&#x9017;&#x53F7;&#x5206;&#x5F00;&#xFF1A;</p>
<pre><code>&lt;tag_key&gt;=&lt;tag_value&gt;,&lt;tag_key&gt;=&lt;tag_value&gt;
</code></pre><p>&#x4F8B;&#x5982;&#x4E0A;&#x9762;&#x7684;tag set&#x7531;&#x4E00;&#x4E2A;tag&#x7EC4;&#x6210;<code>location=us-midwest</code>&#xFF0C;&#x73B0;&#x5728;&#x52A0;&#x53E6;&#x4E00;&#x4E2A;tag(<code>season=summer</code>)&#xFF0C;&#x5C31;&#x53D8;&#x6210;&#x4E86;&#x8FD9;&#x6837;&#xFF1A;</p>
<pre><code>weather,location=us-midwest,season=summer temperature=82 1465839830100400200
</code></pre><p>&#x4E3A;&#x4E86;&#x83B7;&#x5F97;&#x6700;&#x4F73;&#x6027;&#x80FD;&#xFF0C;&#x60A8;&#x5E94;&#x8BE5;&#x5728;&#x5C06;&#x5B83;&#x4EEC;&#x53D1;&#x9001;&#x5230;&#x6570;&#x636E;&#x5E93;&#x4E4B;&#x524D;&#x6309;&#x952E;&#x8FDB;&#x884C;&#x6392;&#x5E8F;&#x3002;&#x6392;&#x5E8F;&#x5E94;&#x8BE5;&#x4E0E;<a href="http://golang.org/pkg/bytes/#Compare" target="_blank">Go bytes.Compare function</a>&#x7684;&#x7ED3;&#x679C;&#x76F8;&#x5339;&#x914D;&#x3002;</p>
<h3 id="&#x7A7A;&#x683C;1">&#x7A7A;&#x683C;1</h3>
<p>&#x5206;&#x79BB;measurement&#x548C;field set&#xFF0C;&#x6216;&#x8005;&#x5982;&#x679C;&#x60A8;&#x4F7F;&#x7528;&#x6570;&#x636E;&#x70B9;&#x5305;&#x542B;tag set&#xFF0C;&#x5219;&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x5206;&#x9694;tag set&#x548C;field set&#x3002;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x7A7A;&#x683C;&#x662F;&#x5FC5;&#x9700;&#x7684;&#x3002;</p>
<p>&#x6CA1;&#x6709;tag set&#x7684;&#x6709;&#x6548;&#x884C;&#x534F;&#x8BAE;&#xFF1A;</p>
<pre><code>weather temperature=82 1465839830100400200
</code></pre><h3 id="field-set">Field set</h3>
<p>&#x6BCF;&#x4E2A;&#x6570;&#x636E;&#x70B9;&#x5728;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x81F3;&#x5C11;&#x9700;&#x8981;&#x4E00;&#x4E2A;field&#x3002;&#x4F7F;&#x7528;&#x65E0;&#x7A7A;&#x683C;&#x7684;<code>=</code>&#x5206;&#x9694;field&#x7684;&#x952E;&#x503C;&#x5BF9;&#xFF1A;</p>
<pre><code>&lt;field_key&gt;=&lt;field_value&gt;
</code></pre><p>&#x591A;&#x7EC4;field&#x76F4;&#x63A5;&#x7528;&#x4E0D;&#x5E26;&#x7A7A;&#x683C;&#x7684;&#x9017;&#x53F7;&#x5206;&#x5F00;&#xFF1A;</p>
<pre><code>&lt;field_key&gt;=&lt;field_value&gt;,&lt;field_key&gt;=&lt;field_value&gt;
</code></pre><p>&#x4F8B;&#x5982;&#x4E0A;&#x9762;&#x7684;field set&#x7531;&#x4E00;&#x4E2A;field&#x7EC4;&#x6210;<code>temperature=82</code>&#xFF0C;&#x73B0;&#x5728;&#x52A0;&#x53E6;&#x4E00;&#x4E2A;field(<code>bug_concentration=98</code>)&#xFF0C;&#x5C31;&#x53D8;&#x6210;&#x4E86;&#x8FD9;&#x6837;&#xFF1A;</p>
<pre><code>weather,location=us-midwest temperature=82,bug_concentration=98 1465839830100400200
</code></pre><h3 id="&#x7A7A;&#x683C;2">&#x7A7A;&#x683C;2</h3>
<p>&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x5206;&#x9694;field set&#x548C;&#x53EF;&#x9009;&#x7684;&#x65F6;&#x95F4;&#x6233;&#x3002;&#x5982;&#x679C;&#x4F60;&#x5305;&#x542B;&#x65F6;&#x95F4;&#x6233;&#xFF0C;&#x5219;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x9700;&#x8981;&#x7A7A;&#x683C;&#x3002;</p>
<h3 id="timestamp">Timestamp</h3>
<p>&#x6570;&#x636E;&#x70B9;&#x7684;&#x65F6;&#x95F4;&#x6233;&#x8BB0;&#x4EE5;&#x7EB3;&#x79D2;&#x7CBE;&#x5EA6;Unix&#x65F6;&#x95F4;&#x3002;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x7684;&#x65F6;&#x95F4;&#x6233;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002; &#x5982;&#x679C;&#x6CA1;&#x6709;&#x4E3A;&#x6570;&#x636E;&#x70B9;&#x6307;&#x5B9A;&#x65F6;&#x95F4;&#x6233;&#xFF0C;InfluxDB&#x4F1A;&#x4F7F;&#x7528;&#x670D;&#x52A1;&#x5668;&#x7684;&#x672C;&#x5730;&#x7EB3;&#x79D2;&#x65F6;&#x95F4;&#x6233;&#x3002;</p>
<p>&#x5728;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#x4E2D;&#xFF0C;&#x65F6;&#x95F4;&#x6233;&#x8BB0;&#x662F;<code>1465839830100400200</code>&#xFF08;&#x8FD9;&#x5C31;&#x662F;RFC6393&#x683C;&#x5F0F;&#x7684;<code>2016-06-13T17&#xFF1A;43&#xFF1A;50.1004002Z</code>&#xFF09;&#x3002;&#x4E0B;&#x9762;&#x7684;&#x884C;&#x534F;&#x8BAE;&#x662F;&#x76F8;&#x540C;&#x7684;&#x6570;&#x636E;&#x70B9;&#xFF0C;&#x4F46;&#x6CA1;&#x6709;&#x65F6;&#x95F4;&#x6233;&#x3002;&#x5F53;InfluxDB&#x5C06;&#x5176;&#x5199;&#x5165;&#x6570;&#x636E;&#x5E93;&#x65F6;&#xFF0C;&#x5B83;&#x5C06;&#x4F7F;&#x7528;&#x60A8;&#x7684;&#x670D;&#x52A1;&#x5668;&#x7684;&#x672C;&#x5730;&#x65F6;&#x95F4;&#x6233;&#x800C;&#x4E0D;&#x662F;<code>2016-06-13T17&#xFF1A;43&#xFF1A;50.1004002Z</code>&#x3002;</p>
<pre><code>weather,location=us-midwest temperature=82
</code></pre><p>&#x4F7F;&#x7528;HTTP API&#x6765;&#x6307;&#x5B9A;&#x7CBE;&#x5EA6;&#x8D85;&#x8FC7;&#x7EB3;&#x79D2;&#x7684;&#x65F6;&#x95F4;&#x6233;&#xFF0C;&#x4F8B;&#x5982;&#x5FAE;&#x79D2;&#xFF0C;&#x6BEB;&#x79D2;&#x6216;&#x79D2;&#x3002;&#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x6700;&#x7C97;&#x7CD9;&#x7684;&#x7CBE;&#x5EA6;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x6837;&#x53EF;&#x4EE5;&#x663E;&#x7740;&#x63D0;&#x9AD8;&#x538B;&#x7F29;&#x7387;&#x3002; &#x6709;&#x5173;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;[API&#x53C2;&#x8003;]&#x3002;</p>
<blockquote>
<p>&#x5C0F;&#x8D34;&#x58EB;&#xFF1A;<br>&#x4F7F;&#x7528;&#x7F51;&#x7EDC;&#x65F6;&#x95F4;&#x534F;&#x8BAE;&#xFF08;NTP&#xFF09;&#x6765;&#x540C;&#x6B65;&#x4E3B;&#x673A;&#x4E4B;&#x95F4;&#x7684;&#x65F6;&#x95F4;&#x3002;InfluxDB&#x4F7F;&#x7528;&#x4E3B;&#x673A;&#x5728;UTC&#x7684;&#x672C;&#x5730;&#x65F6;&#x95F4;&#x4E3A;&#x6570;&#x636E;&#x5206;&#x914D;&#x65F6;&#x95F4;&#x6233;; &#x5982;&#x679C;&#x4E3B;&#x673A;&#x7684;&#x65F6;&#x949F;&#x4E0E;NTP&#x4E0D;&#x540C;&#x6B65;&#xFF0C;&#x5199;&#x5165;InfluxDB&#x7684;&#x6570;&#x636E;&#x7684;&#x65F6;&#x95F4;&#x6233;&#x53EF;&#x80FD;&#x4E0D;&#x6B63;&#x786E;&#x3002;</p>
</blockquote>
<h2 id="&#x6570;&#x636E;&#x7C7B;&#x578B;">&#x6570;&#x636E;&#x7C7B;&#x578B;</h2>
<p>&#x672C;&#x8282;&#x4ECB;&#x7ECD;&#x884C;&#x534F;&#x8BAE;&#x7684;&#x4E3B;&#x8981;&#x7EC4;&#x4EF6;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF1A;measurement&#xFF0C;tag keys&#xFF0C;tag values&#xFF0C;field keys&#xFF0C;field values&#x548C;timestamp&#x3002;</p>
<p>&#x5176;&#x4E2D;measurement&#xFF0C;tag keys&#xFF0C;tag values&#xFF0C;field keys&#x59CB;&#x7EC8;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x3002;</p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x56E0;&#x4E3A;InfluxDB&#x5C06;tag value&#x5B58;&#x50A8;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x6240;&#x4EE5;InfluxDB&#x65E0;&#x6CD5;&#x5BF9;tag value&#x8FDB;&#x884C;&#x6570;&#x5B66;&#x8FD0;&#x7B97;&#x3002;&#x6B64;&#x5916;&#xFF0C;InfluxQL&#x51FD;&#x6570;&#x4E0D;&#x63A5;&#x53D7;tag value&#x4F5C;&#x4E3A;&#x4E3B;&#x8981;&#x53C2;&#x6570;&#x3002; &#x5728;&#x8BBE;&#x8BA1;&#x67B6;&#x6784;&#x65F6;&#x8981;&#x8003;&#x8651;&#x5230;&#x8FD9;&#x4E9B;&#x4FE1;&#x606F;&#x3002;</p>
</blockquote>
<p>Timestamps&#x662F;UNIX&#x65F6;&#x95F4;&#x6233;&#x3002; &#x6700;&#x5C0F;&#x6709;&#x6548;&#x65F6;&#x95F4;&#x6233;&#x4E3A;<code>-9223372036854775806</code>&#x6216;<code>1677-09-21T00&#xFF1A;12&#xFF1A;43.145224194Z</code>&#x3002;&#x6700;&#x5927;&#x6709;&#x6548;&#x65F6;&#x95F4;&#x6233;&#x4E3A;<code>9223372036854775806</code>&#x6216;<code>2262-04-11T23&#xFF1A;47&#xFF1A;16.854775806Z</code>&#x3002; &#x5982;&#x4E0A;&#x6240;&#x8FF0;&#xFF0C;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;InfluxDB&#x5047;&#x5B9A;&#x65F6;&#x95F4;&#x6233;&#x5177;&#x6709;&#x7EB3;&#x79D2;&#x7CBE;&#x5EA6;&#x3002;&#x6709;&#x5173;&#x5982;&#x4F55;&#x6307;&#x5B9A;&#x66FF;&#x4EE3;&#x7CBE;&#x5EA6;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">API&#x53C2;&#x8003;</a>&#x3002;</p>
<p>Field value&#x53EF;&#x4EE5;&#x662F;&#x6574;&#x6570;&#x3001;&#x6D6E;&#x70B9;&#x6570;&#x3001;&#x5B57;&#x7B26;&#x4E32;&#x548C;&#x5E03;&#x5C14;&#x503C;&#xFF1A;</p>
<ul>
<li><p>&#x6D6E;&#x70B9;&#x6570; &#x2014;&#x2014; &#x9ED8;&#x8BA4;&#x662F;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;InfluxDB&#x5047;&#x5B9A;&#x6536;&#x5230;&#x7684;&#x6240;&#x6709;field value&#x90FD;&#x662F;&#x6D6E;&#x70B9;&#x6570;&#x3002;<br>&#x4EE5;&#x6D6E;&#x70B9;&#x7C7B;&#x578B;&#x5B58;&#x50A8;&#x4E0A;&#x9762;&#x7684;<code>82</code>&#xFF1A;</p>
<pre><code>weather,location=us-midwest temperature=82 1465839830100400200
</code></pre></li>
<li><p>&#x6574;&#x6570; &#x2014;&#x2014; &#x6DFB;&#x52A0;&#x4E00;&#x4E2A;<code>i</code>&#x5728;field&#x4E4B;&#x540E;&#xFF0C;&#x544A;&#x8BC9;InfluxDB&#x4EE5;&#x6574;&#x6570;&#x7C7B;&#x578B;&#x5B58;&#x50A8;&#xFF1A;<br>&#x4EE5;&#x6574;&#x6570;&#x7C7B;&#x578B;&#x5B58;&#x50A8;&#x4E0A;&#x9762;&#x7684;<code>82</code>&#xFF1A;</p>
<pre><code>weather,location=us-midwest temperature=82i 1465839830100400200
</code></pre></li>
<li><p>&#x5B57;&#x7B26;&#x4E32; &#x2014;&#x2014; &#x53CC;&#x5F15;&#x53F7;&#x628A;&#x5B57;&#x6BB5;&#x503C;&#x5F15;&#x8D77;&#x6765;&#x8868;&#x793A;&#x5B57;&#x7B26;&#x4E32;:<br>&#x4EE5;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#x5B58;&#x50A8;&#x503C;<code>too warm</code>&#xFF1A;</p>
<pre><code>weather,location=us-midwest temperature=&quot;too warm&quot; 1465839830100400200
</code></pre></li>
<li><p>&#x5E03;&#x5C14;&#x578B; &#x2014;&#x2014; &#x8868;&#x793A;TRUE&#x53EF;&#x4EE5;&#x7528;<code>t</code>,<code>T</code>,<code>true</code>,<code>True</code>,<code>TRUE</code>;&#x8868;&#x793A;FALSE&#x53EF;&#x4EE5;&#x7528;<code>f</code>,<code>F</code>,<code>false</code>,<code>False</code>&#x6216;&#x8005;<code>FALSE</code>&#xFF1A;<br>&#x4EE5;&#x5E03;&#x5C14;&#x7C7B;&#x578B;&#x5B58;&#x50A8;&#x503C;<code>true</code>&#xFF1A;</p>
</li>
</ul>
<pre><code>weather,location=us-midwest too_hot=true 1465839830100400200
</code></pre><blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x6570;&#x636E;&#x5199;&#x5165;&#x548C;&#x6570;&#x636E;&#x67E5;&#x8BE2;&#x53EF;&#x63A5;&#x53D7;&#x7684;&#x5E03;&#x5C14;&#x8BED;&#x6CD5;&#x4E0D;&#x540C;&#x3002; &#x6709;&#x5173;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x5E38;&#x89C1;&#x95EE;&#x9898;</a>&#x3002;</p>
</blockquote>
<p>&#x5728;measurement&#x4E2D;&#xFF0C;field value&#x7684;&#x7C7B;&#x578B;&#x5728;&#x5206;&#x7247;&#x5185;&#x4E0D;&#x4F1A;&#x6709;&#x5DEE;&#x5F02;&#xFF0C;&#x4F46;&#x5728;&#x5206;&#x7247;&#x4E4B;&#x95F4;&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x6240;&#x4E0D;&#x540C;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x5982;&#x679C;InfluxDB&#x5C1D;&#x8BD5;&#x5C06;&#x6574;&#x6570;&#x5199;&#x5165;&#x5230;&#x4E0E;&#x6D6E;&#x70B9;&#x6570;&#x76F8;&#x540C;&#x7684;&#x5206;&#x7247;&#x4E2D;&#xFF0C;&#x5219;&#x5199;&#x5165;&#x4F1A;&#x5931;&#x8D25;&#xFF1A;</p>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=82 1465839830100400200
&gt; INSERT weather,location=us-midwest temperature=81i 1465839830100400300
ERR: {&quot;error&quot;:&quot;field type conflict: input field \&quot;temperature\&quot; on measurement \&quot;weather\&quot; is type int64, already exists as type float&quot;}
</code></pre><p>&#x4F46;&#x662F;&#xFF0C;&#x5982;&#x679C;InfluxDB&#x5C06;&#x6574;&#x6570;&#x5199;&#x5165;&#x5230;&#x4E00;&#x4E2A;&#x65B0;&#x7684;shard&#x4E2D;&#xFF0C;&#x867D;&#x7136;&#x4E4B;&#x524D;&#x5199;&#x7684;&#x662F;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;&#x90A3;&#x4F9D;&#x7136;&#x53EF;&#x4EE5;&#x5199;&#x6210;&#x529F;&#xFF1A;</p>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=82 1465839830100400200
&gt; INSERT weather,location=us-midwest temperature=81i 1467154750000000000
&gt;
</code></pre><p>&#x6709;&#x5173;&#x5B57;&#x6BB5;&#x503C;&#x7C7B;&#x578B;&#x5DEE;&#x5F02;&#x5982;&#x4F55;&#x5F71;&#x54CD;<code>SELECT *</code>&#x67E5;&#x8BE2;&#x7684;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x5E38;&#x89C1;&#x95EE;&#x9898;</a>&#x3002;</p>
<h2 id="&#x5F15;&#x53F7;">&#x5F15;&#x53F7;</h2>
<p>&#x672C;&#x8282;&#x6DB5;&#x76D6;&#x4F55;&#x65F6;&#x4E0D;&#x8981;&#x548C;&#x4F55;&#x65F6;&#x4E0D;&#x8981;&#x5728;&#x884C;&#x534F;&#x8BAE;&#x4E2D;&#x4F7F;&#x7528;&#x53CC;&#xFF08;<code>&#x201C;</code>&#xFF09;&#x6216;&#x5355;&#xFF08;<code>&apos;</code>&#xFF09;&#x5F15;&#x53F7;&#x3002;</p>
<ul>
<li>&#x65F6;&#x95F4;&#x6233;&#x4E0D;&#x8981;&#x53CC;&#x6216;&#x5355;&#x5F15;&#x53F7;&#x3002;&#x4E0B;&#x9762;&#x8FD9;&#x662F;&#x65E0;&#x6548;&#x7684;&#x884C;&#x534F;&#x8BAE;&#x3002; &#x4F8B;&#xFF1A;</li>
</ul>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=82 &quot;1465839830100400200&quot;
ERR: {&quot;error&quot;:&quot;unable to parse &apos;weather,location=us-midwest temperature=82 \&quot;1465839830100400200\&quot;&apos;: bad timestamp&quot;}
</code></pre><ul>
<li>field value&#x4E0D;&#x8981;&#x5355;&#x5F15;&#x53F7;,&#x5373;&#x65F6;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#x3002;&#x4E0B;&#x9762;&#x8FD9;&#x662F;&#x65E0;&#x6548;&#x7684;&#x884C;&#x534F;&#x8BAE;&#x3002; &#x4F8B;&#xFF1A;</li>
</ul>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=&apos;too warm&apos;
ERR: {&quot;error&quot;:&quot;unable to parse &apos;weather,location=us-midwest temperature=&apos;too warm&apos;&apos;: invalid boolean&quot;}
</code></pre><ul>
<li>measurement&#x540D;&#x79F0;&#xFF0C;tag keys&#xFF0C;tag value&#x548C;field key&#x4E0D;&#x7528;&#x5355;&#x53CC;&#x5F15;&#x53F7;&#x3002;InfluxDB&#x4F1A;&#x5047;&#x5B9A;&#x5F15;&#x53F7;&#x662F;&#x540D;&#x79F0;&#x7684;&#x4E00;&#x90E8;&#x5206;&#x3002;&#x4F8B;&#x5982;&#xFF1A;</li>
</ul>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=82 1465839830100400200
&gt; INSERT &quot;weather&quot;,location=us-midwest temperature=87 1465839830100400200
&gt; SHOW MEASUREMENTS
name: measurements
------------------
name
&quot;weather&quot;
weather
</code></pre><p>&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x4E2D;&#x7684;<code>&quot;weather&quot;</code>&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x4E3A;measurement&#x540D;&#x79F0;&#x4E2D;&#x7684;&#x5F15;&#x53F7;&#x8F6C;&#x4E49;&#xFF1A;</p>
<pre><code>&gt; SELECT * FROM &quot;\&quot;weather\&quot;&quot;
name: &quot;weather&quot;
---------------
time                            location     temperature
2016-06-13T17:43:50.1004002Z    us-midwest   87
</code></pre><ul>
<li>&#x5F53;field value&#x662F;&#x6574;&#x6570;&#xFF0C;&#x6D6E;&#x70B9;&#x6570;&#x6216;&#x662F;&#x5E03;&#x5C14;&#x578B;&#x65F6;&#xFF0C;&#x4E0D;&#x8981;&#x4F7F;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#xFF0C;&#x4E0D;&#x7136;InfluxDB&#x4F1A;&#x5047;&#x5B9A;&#x503C;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#xFF1A;</li>
</ul>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=&quot;82&quot;
&gt; SELECT * FROM weather WHERE temperature &gt;= 70
&gt;
</code></pre><ul>
<li>&#x5F53;Field value&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#xFF1A;</li>
</ul>
<pre><code>&gt; INSERT weather,location=us-midwest temperature=&quot;too warm&quot;
&gt; SELECT * FROM weather
name: weather
-------------
time                            location     temperature
2016-06-13T19:10:09.995766248Z  us-midwest   too warm
</code></pre><h2 id="&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#x548C;&#x5173;&#x952E;&#x5B57;">&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#x548C;&#x5173;&#x952E;&#x5B57;</h2>
<h3 id="&#x7279;&#x6B8A;&#x5B57;&#x7B26;">&#x7279;&#x6B8A;&#x5B57;&#x7B26;</h3>
<p>&#x5BF9;&#x4E8E;tag key&#xFF0C;tag value&#x548C;field key&#xFF0C;&#x59CB;&#x7EC8;&#x4F7F;&#x7528;&#x53CD;&#x659C;&#x6760;&#x5B57;&#x7B26;\&#x6765;&#x8FDB;&#x884C;&#x8F6C;&#x4E49;&#xFF1A;</p>
<ul>
<li>&#x9017;&#x53F7;<code>,</code>&#xFF1A;</li>
</ul>
<pre><code>weather,location=us\,midwest temperature=82 1465839830100400200
</code></pre><ul>
<li>&#x7B49;&#x53F7;<code>=</code>&#xFF1A;</li>
</ul>
<pre><code>weather,location=us-midwest temp\=rature=82 1465839830100400200
</code></pre><ul>
<li>&#x7A7A;&#x683C;&#xFF1A;</li>
</ul>
<pre><code>weather,location\ place=us-midwest temperature=82 1465839830100400200
</code></pre><p>&#x5BF9;&#x4E8E;measurement&#xFF0C;&#x4E5F;&#x8981;&#x53CD;&#x659C;&#x6760;\&#x6765;&#x8F6C;&#x4E49;&#x3002;</p>
<ul>
<li>&#x9017;&#x53F7;<code>,</code>&#xFF1A;</li>
</ul>
<pre><code>wea\,ther,location=us-midwest temperature=82 1465839830100400200
</code></pre><ul>
<li>&#x7A7A;&#x683C;&#xFF1A;</li>
</ul>
<pre><code>wea\ ther,location=us-midwest temperature=82 1465839830100400200
</code></pre><p>&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#x7684;field value&#xFF0C;&#x4E5F;&#x8981;&#x53CD;&#x659C;&#x6760;\&#x6765;&#x8F6C;&#x4E49;&#x3002;</p>
<ul>
<li>&#x53CC;&#x5F15;&#x53F7;<code>&quot;</code>&#xFF1A;</li>
</ul>
<pre><code>weather,location=us-midwest temperature=&quot;too\&quot;hot\&quot;&quot; 1465839830100400200
</code></pre><p>&#x884C;&#x534F;&#x8BAE;&#x4E0D;&#x8981;&#x6C42;&#x7528;&#x6237;&#x8F6C;&#x4E49;&#x53CD;&#x659C;&#x6760;&#x5B57;&#x7B26;\&#x3002;&#x6240;&#x6709;&#x5176;&#x4ED6;&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#x4E5F;&#x4E0D;&#x9700;&#x8981;&#x8F6C;&#x4E49;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x884C;&#x534F;&#x8BAE;&#x5904;&#x7406;emojis&#x6CA1;&#x6709;&#x95EE;&#x9898;&#xFF1A;</p>
<pre><code>&gt; INSERT we&#x26C5;&#xFE0F;ther,location=us-midwest temper&#x1F525;ture=82 1465839830100400200
&gt; SELECT * FROM &quot;we&#x26C5;&#xFE0F;ther&quot;
name: we&#x26C5;&#xFE0F;ther
------------------
time                          location       temper&#x1F525;ture
1465839830100400200     us-midwest     82
</code></pre><h3 id="&#x5173;&#x952E;&#x5B57;">&#x5173;&#x952E;&#x5B57;</h3>
<p>&#x884C;&#x534F;&#x8BAE;&#x63A5;&#x53D7;InfluxQL&#x5173;&#x952E;&#x5B57;&#x4F5C;&#x4E3A;&#x6807;&#x8BC6;&#x7B26;&#x540D;&#x79F0;&#x3002;&#x4E00;&#x822C;&#x6765;&#x8BF4;&#xFF0C;&#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x907F;&#x514D;&#x5728;schema&#x4E2D;&#x4F7F;&#x7528;InfluxQL&#x5173;&#x952E;&#x5B57;&#xFF0C;&#x56E0;&#x4E3A;&#x5B83;&#x53EF;&#x80FD;&#x4F1A;&#x5728;&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x65F6;&#x5F15;&#x8D77;&#x6DF7;&#x6DC6;&#x3002; </p>
<p>&#x5173;&#x952E;&#x5B57;<code>time</code>&#x662F;&#x7279;&#x6B8A;&#x60C5;&#x51B5;&#x3002;<code>time</code>&#x53EF;&#x4EE5;&#x662F;cq&#x7684;&#x540D;&#x79F0;&#xFF0C;&#x6570;&#x636E;&#x5E93;&#x540D;&#x79F0;&#xFF0C;measurement&#x540D;&#x79F0;&#xFF0C;RP&#x540D;&#x79F0;&#xFF0C;subscription&#x540D;&#x79F0;&#x548C;&#x7528;&#x6237;&#x540D; &#x5728;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x67E5;&#x8BE2;<code>time</code>&#x4E0D;&#x9700;&#x8981;&#x53CC;&#x5F15;&#x53F7;&#x3002;<code>time</code>&#x4E0D;&#x80FD;&#x662F;field key&#x6216;tag key; &#x5F53;&#x628A;<code>time</code>&#x4F5C;&#x4E3A;field key&#x6216;&#x662F;tag key&#x5199;&#x5165;&#x65F6;&#xFF0C;InfluxDB&#x4F1A;&#x62D2;&#x7EDD;&#x5E76;&#x8FD4;&#x56DE;&#x9519;&#x8BEF;&#x3002;&#x6709;&#x5173;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x5E38;&#x89C1;&#x95EE;&#x9898;</a>&#x3002;</p>
<h2 id="&#x5199;&#x6570;&#x636E;&#x5230;influxdb">&#x5199;&#x6570;&#x636E;&#x5230;InfluxDB</h2>
<h3 id="&#x5199;&#x5165;&#x6570;&#x636E;&#x7684;&#x65B9;&#x6CD5;">&#x5199;&#x5165;&#x6570;&#x636E;&#x7684;&#x65B9;&#x6CD5;</h3>
<p>&#x73B0;&#x5728;&#x4F60;&#x77E5;&#x9053;&#x6240;&#x6709;&#x5173;&#x4E8E;&#x884C;&#x534F;&#x8BAE;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x4F60;&#x5982;&#x4F55;&#x5728;&#x4F7F;&#x7528;&#x4E2D;&#x7528;&#x884C;&#x534F;&#x8BAE;&#x5199;&#x5165;&#x6570;&#x636E;&#x5230;InfluxDB&#x5462;&#xFF1F;&#x5728;&#x8FD9;&#x91CC;&#xFF0C;&#x6211;&#x4EEC;&#x5C06;&#x7ED9;&#x51FA;&#x4E24;&#x4E2A;&#x5FEB;&#x901F;&#x793A;&#x4F8B;&#xFF0C;&#x7136;&#x540E;&#x53EF;&#x4EE5;&#x5230;<a href="">&#x5DE5;&#x5177;</a>&#x90E8;&#x5206;&#x4EE5;&#x83B7;&#x53D6;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#x3002;</p>
<h4 id="http-api">HTTP API</h4>
<p>&#x4F7F;&#x7528;HTTP API&#x5C06;&#x6570;&#x636E;&#x5199;&#x5165;InfluxDB&#x3002; &#x5411;<code>/write</code>&#x7AEF;&#x70B9;&#x53D1;&#x9001;<code>POST</code>&#x8BF7;&#x6C42;&#xFF0C;&#x5E76;&#x5728;&#x8BF7;&#x6C42;&#x4E3B;&#x4F53;&#x4E2D;&#x63D0;&#x4F9B;&#x60A8;&#x7684;&#x884C;&#x534F;&#x8BAE;&#xFF1A;</p>
<pre><code>curl -i -XPOST &quot;http://localhost:8086/write?db=science_is_cool&quot; --data-binary &apos;weather,location=us-midwest temperature=82 1465839830100400200&apos;
</code></pre><p>&#x6709;&#x5173;&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#xFF0C;&#x72B6;&#x6001;&#x7801;&#xFF0C;&#x54CD;&#x5E94;&#x548C;&#x66F4;&#x591A;&#x793A;&#x4F8B;&#x7684;&#x6DF1;&#x5165;&#x63CF;&#x8FF0;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">API&#x53C2;&#x8003;</a>&#x3002;</p>
<h4 id="cli">CLI</h4>
<p>&#x4F7F;&#x7528;InfluxDB&#x7684;&#x547D;&#x4EE4;&#x884C;&#x754C;&#x9762;&#xFF08;CLI&#xFF09;&#x5C06;&#x6570;&#x636E;&#x5199;&#x5165;InfluxDB&#x3002;&#x542F;&#x52A8;CLI&#xFF0C;&#x4F7F;&#x7528;&#x76F8;&#x5173;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x5E76;&#x5C06;<code>INSERT</code>&#x653E;&#x5728;&#x884C;&#x534F;&#x8BAE;&#x4E4B;&#x524D;&#xFF1A;</p>
<pre><code>INSERT weather,location=us-midwest temperature=82 1465839830100400200
</code></pre><p>&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;CLI&#x4ECE;&#x6587;&#x4EF6;&#x5BFC;&#x5165;&#x884C;&#x534F;&#x8BAE;&#x3002; </p>
<p>&#x8FD8;&#x6709;&#x51E0;&#x79CD;&#x5C06;&#x6570;&#x636E;&#x5199;&#x5165;InfluxDB&#x7684;&#x65B9;&#x5F0F;&#x3002;&#x6709;&#x5173;HTTP API&#xFF0C;CLI&#x548C;&#x53EF;&#x7528;&#x7684;&#x670D;&#x52A1;&#x63D2;&#x4EF6;&#xFF08;UDP&#xFF0C;Graphite&#xFF0C;CollectD&#x548C;OpenTSDB&#xFF09;&#x7684;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x5DE5;&#x5177;</a>&#x90E8;&#x5206;&#x3002;</p>
<h3 id="&#x91CD;&#x590D;&#x6570;&#x636E;">&#x91CD;&#x590D;&#x6570;&#x636E;</h3>
<p>&#x4E00;&#x4E2A;&#x70B9;&#x7531;measurement&#x540D;&#x79F0;&#xFF0C;tag set&#x548C;timestamp&#x552F;&#x4E00;&#x6807;&#x8BC6;&#x3002;&#x5982;&#x679C;&#x60A8;&#x63D0;&#x4EA4;&#x5177;&#x6709;&#x76F8;&#x540C;measurement&#xFF0C;tag set&#x548C;timestamp&#xFF0C;&#x4F46;&#x5177;&#x6709;&#x4E0D;&#x540C;field set&#x7684;&#x884C;&#x534F;&#x8BAE;&#xFF0C;&#x5219;field set&#x5C06;&#x53D8;&#x4E3A;&#x65E7;field set&#x4E0E;&#x65B0;field set&#x7684;&#x5408;&#x5E76;&#xFF0C;&#x5E76;&#x4E14;&#x5982;&#x679C;&#x6709;&#x4EFB;&#x4F55;&#x51B2;&#x7A81;&#x4EE5;&#x65B0;field set&#x4E3A;&#x51C6;&#x3002; </p>
<p>&#x6709;&#x5173;&#x6B64;&#x884C;&#x4E3A;&#x7684;&#x5B8C;&#x6574;&#x793A;&#x4F8B;&#x4EE5;&#x53CA;&#x5982;&#x4F55;&#x907F;&#x514D;&#x6B64;&#x95EE;&#x9898;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x5E38;&#x89C1;&#x95EE;&#x9898;</a>&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 写入协议">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../Query_language/" class="navigation navigation-next " aria-label="Next page: 查询语言">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"行协议","level":"1.5.1","depth":2,"next":{"title":"查询语言","level":"1.6","depth":1,"path":"Query_language/index.md","ref":"Query_language/index.md","articles":[{"title":"数据查询语法","level":"1.6.1","depth":2,"path":"Query_language/data_exploration.md","ref":"Query_language/data_exploration.md","articles":[]},{"title":"schema查询语法","level":"1.6.2","depth":2,"path":"Query_language/schema_exploration.md","ref":"Query_language/schema_exploration.md","articles":[]},{"title":"数据库管理","level":"1.6.3","depth":2,"path":"Query_language/database_management.md","ref":"Query_language/database_management.md","articles":[]},{"title":"连续查询","level":"1.6.4","depth":2,"path":"Query_language/continuous_queries.md","ref":"Query_language/continuous_queries.md","articles":[]},{"title":"函数","level":"1.6.5","depth":2,"path":"Query_language/functions.md","ref":"Query_language/functions.md","articles":[]},{"title":"数学运算符","level":"1.6.6","depth":2,"path":"Query_language/math_operators.md","ref":"Query_language/math_operators.md","articles":[]},{"title":"认证和授权","level":"1.6.7","depth":2,"path":"Query_language/authentication_and_authorization.md","ref":"Query_language/authentication_and_authorization.md","articles":[]}]},"previous":{"title":"写入协议","level":"1.5","depth":1,"path":"Write_protocols/index.md","ref":"Write_protocols/index.md","articles":[{"title":"行协议","level":"1.5.1","depth":2,"path":"Write_protocols/line_protocol.md","ref":"Write_protocols/line_protocol.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["comment"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"comment":{"highlightCommented":true},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"jasper-zhang/influxdb-document-cn","theme":"default","author":"jasper","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"InfluxDB中文文档","language":"en","links":{"sidebar":{"InfluxDB中文文档":"https://legacy.gitbook.com/book/jasper-zhang1/influxdb"},"gitbook":true},"gitbook":"*","description":""},"file":{"path":"Write_protocols/line_protocol.md","mtime":"2019-09-29T09:05:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-29T09:10:37.143Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

